<?php
error_reporting(E_ALL && ~E_NOTICE);
    session_start();
include '../../db/dbConnect.php';
include '../function/helper.php';
?>
<script type="text/javascript">
	$("a.link2u_profile").bind('click',function(){
		var hrf=$(this).attr("href");
		$("body").load(hrf);
		return  false;
	});
</script>
<?php


$iduser=escape($_GET['iduser']);

$sql='select up.user as user_matched, 
			up.pref as pref, 
			u.fstName as aim_name,
			u.avatar as avatar
		from u_user as u,
				u_pref as up
		where up.user=u.iduser
			and up.matched=1
			and up.user_aim="'.$iduser.'"';
$result=mysql_query($sql);
if(!mysql_error() && mysql_num_rows($result)){
	$row=mysql_fetch_array($result);
?>

<a href="web/profile.php?user_profile=<?php echo $row['user_matched'];?>" class="link2u_profile tc block">
<img style="margin:auto 3px;" class="avatar" id="avatar_aim" src="web/images/avatar/<?php if($row['avatar']){ echo $row['avatar']; }else echo 'avatar_default.jpg';?>" width="110px" height="110px" title="<?php echo $row['aim_name']; ?>"  />
<div id="aim_name""><?php echo $row["aim_name"]?> <strong id="match_p">(<?php echo $row["pref"]?>%)</strong></div>

</a>

	<?php

}else echo mysql_error();
?>


